/*
 * ioctl.h
 *
 *  Created on: Mar 10, 2013
 *      Author: is4@uw.edu
 */

#ifndef IOCTL_H_
#define IOCTL_H_

#include "global.h"
#include "kbdctl.h"

typedef struct
{
	KbdctlPtr kbd;
} IoctlStr;

typedef IoctlStr * IoctlPtr;

#define IO_VID_STATUS 0x30
#define IO_VID_DATA   0x32
#define IO_KBD_STATUS 0x38
#define IO_KBD_DATA0  0x3A
#define IO_KBD_DATA1  0x3B

IoctlPtr ioctl_new(void);
void ioctl_initialize(IoctlPtr ioctl);
void ioctl_free(IoctlPtr ioctl);

Byte ioctl_read(IoctlPtr ioctl, Byte port);
void ioctl_kbdkeypress(IoctlPtr ioctl, Byte character);
void ioctl_write(IoctlPtr ioctl, Byte port, Byte value);

#endif /* IOCTL_H_ */
